package com.demo2do.fms.entity.report;

import java.sql.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.commons.lang3.StringUtils;
import org.hibernate.annotations.GenericGenerator;

import com.demo2do.fms.entity.business.shipment.TransType;

@Entity
@Table(name = "VW_ANLZ_FINISHED_BIZ_DETAIL")
public class CostRevenueAnalysis {
	
	@Id
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "assigned")
    private Long archiveId;
	
	/**
	 * VIN码 VIN_CODE
	 */
	private String vinCode;
	
	/**
	 * 车型 VH_MODLE_NAME
	 */
	private String vhModleName;

	/**
	 * 车型ID VH_CARTYPE_ID
	 */
	private String vhCartypeId;
	
	/**
	 * 中文车牌号 VEHICLE_NAME
	 */
	private String vehicleName;
	
	/**
	 * TYRE_FEE	轮胎费 double
	 */
	private Double tyreFee;
	
	/**
	 * TRANS_MEANS_ID	车辆ID long
	 */
	private Long transMeansId;
	
	/**
	 * SRC_WH_ID	起始地仓库ID long
	 */
	private Long srcWhId;
	
	/**
	 * SRC_WH_NAME	起始地仓库名 string
	 */
	private String srcWhName;
	
	/**
	 * TRANS_TYPE	运输方式 string
	 */										
	private String transType;
	
	/**
	 * SRC_PROV_NAME	起始地所在省 string
	 */
	private String srcProvName;
	
	/**
	 * SRC_LP_NAME	起始地装卸地名 string
	 */
	private String srcLpName;
	
	/**
	 * SRC_CITY_NAME	起始地城市 string
	 */
	private String srcCityName;
	
	/**
	 *SHIPMENT_ID	调度指令ID
	*SHIPMENT_DATE	调度时间
	*ROAD_FEE	路桥费
	*REPAIR_FEE	修理费
	*OUTSOURCING_RATE	外包结算单价
	*OUTSOURCING_FEE	外包结算费用
	*OUTSOURCING_DISTANCE	外包结算公里数
	*OUTSOURCING_COMPANY_NAME	外包公司名
	*OUTSOURCING_COMPANY_ID	外包公司ID
	 */
	private Long shipmentId;
	
	private Date shipmentDate;
	
	private Double roadFee;			
	
	private Double repairFee;
	
	private Double outsourcingRate;
	
	private Double outsourcingFee;
	
	private Integer outsourcingDistance;
	
	private String outsourcingCompanyName;
	
	private Long outsourcingCompanyId;
	
	/*
	 *OTHER_FEE_SUM	其他费用汇总
	*OTHER_FEE_9	其他费用
	*OTHER_FEE_8	其他费用
	*OTHER_FEE_7	其他费用
	*OTHER_FEE_6	其他费用
	*OTHER_FEE_5	其他费用
	*OTHER_FEE_4	其他费用
	*OTHER_FEE_3	其他费用
	*OTHER_FEE_23	其他费用
	*OTHER_FEE_22	其他费用
	*OTHER_FEE_21	其他费用
	*OTHER_FEE_20	其他费用
	*OTHER_FEE_2	其他费用
	*OTHER_FEE_19	其他费用
	*OTHER_FEE_18	其他费用
	*OTHER_FEE_17	其他费用
	*OTHER_FEE_16	其他费用
	*OTHER_FEE_15	其他费用
	*OTHER_FEE_14	其他费用
	*OTHER_FEE_13	其他费用
	*OTHER_FEE_12	其他费用
	*OTHER_FEE_11	其他费用
	*OTHER_FEE_10	其他费用
	*OTHER_FEE_1	其他费用
	 */
	private Double otherFeeSum;
								
	private Double otherFee_9;
	
	private Double otherFee_8;
	
	private Double otherFee_7;
	
	private Double otherFee_6;
	
	private Double otherFee_5;
	
	private Double otherFee_4;
	
	private Double otherFee_3;
	
	private Double otherFee_23;
	
	private Double otherFee_22;
	
	private Double otherFee_21;
	
	private Double otherFee_20;
	
	private Double otherFee_2;
	
	private Double otherFee_19;
	
	private Double otherFee_18;			
	
	private Double otherFee_17;
	
	private Double otherFee_16;;
	
	private Double otherFee_15;
	
	private Double otherFee_14;
	
	private Double otherFee_13;
	
	private Double otherFee_12;
	
	private Double otherFee_11;
	
	private Double otherFee_10;
	
	private Double otherFee_1;
	
	/*
	 *ORDER_ID	订单ID
	*OIL_USAGE	用油量
	*OIL_FEE	油费
	*MANUFACTOR_NAME	制造商名称
	*MAIN_DRIVER_SALARY	主驾工资
	*LOAD_QUANTITY	装载量
	*LOAD_NUMBER	调度指令号
	*LOAD_GROUP_NUMBER	调度指令组号
	*LOAD_DISTANCE	行驶公里数
	*LEAVING_DATE	出发日期
	 */
	private Long orderId;

	private Double oilUsage;

	private Double  oilFee;

	private String manufactorName;

	private Double mainDriverSalary;

	private Integer loadQuantity;			

	private String loadNumber;

	private String loadGroupNumber;

	private Double loadDistance;

	private Date leavingDate;
	
	/**
	 *IS_OUTSOURCING	是否外包
	*FIRST_VICE_DRIVER_SALARY	第一副驾驶工资
	*FIRST_SHIPMENT_ID	首段调度指令ID
	*FINANCE_ID	收入ID
	*EMPTY_COST_SUM	关联的空载指令成本汇总
	*EMPTY_CODE_UNION	关联的空载指令号（可能多个，用“||”分隔）
	*DISPATCH_ORDER_ID	派车单ID
	*DISPATCH_ORDER_CODE	派车单号
	*DEST_WH_NAME	目的地仓库名
	*DEST_WH_ID	目的地仓库ID
	*DEST_PROV_NAME	目的地所在省
	*DEST_LP_NAME	目的地装卸地名
	*DEST_CITY_NAME	目的地城市
	 */
	private String isOutsourcing;

	private Double firstViceDriverSalary;

	private Long firstShipmentId;

	private Long financeId;

	private Integer emptyCostSum;		

	private String emptyCodeUnion;

	private Long dispatchOrderId;

	private String dispatchOrderCode;

	private String destWhName;

	private Long destWhId;

	private String destProvName;

	private String destLpName;

	private String destCityName;
	
	/**
	 *CUSTOMER_NAME	客户名称
	*CUSTOMER_ID	客户ID
	*CONTRACT_SRC_WH_NAME	合同起始地仓库名
	*CONTRACT_SRC_WH_ID	合同起始地仓库ID
	*CONTRACT_SRC_PROV_NAME	合同起始地所在省
	*CONTRACT_SRC_LP_NAME	合同起始地装卸地名
	*CONTRACT_SRC_CITY_NAME	合同起始地城市
	*CONTRACT_KILOMETER	合同结算公里数
	*CONTRACT_FEE_RATE	合同结算单价
	*CONTRACT_FEE	合同结算收入
	*CONTRACT_DEST_WH_NAME	合同目的地仓库名
	*CONTRACT_DEST_WH_ID	合同目的地仓库ID
	*CONTRACT_DEST_PROV_NAME	合同目的地所在省
	*CONTRACT_DEST_LP_NAME	合同目的地装卸地名
	*CONTRACT_DEST_CITY_NAME	合同目的地城市
	*CONSIGNOR_NAME	委托方
	*CONSIGNOR_ID	委托方ID
	*COMPANY_NAME	承运方
	*COMPANY_ID	承运方ID
	*CHILD_FINANCE_ID	子收入ID
	 */
	private String customerName;

	private Long customerId;

	private String contractSrcWhName;

	private Long contractSrcWhId;

	private String contractSrcProvName;			

	private String contractSrcLpName;

	private String contractSrcCityName;

	private Integer contractKilometer;

	private Float contractFeeRate;

	private Float contractFee;

	private String contractDestWhName;

	private Long contractDestWhId;

	private String contractDestProvName;

	private String contractDestLpName;

	private String contractDestCityName;

	private String consignorName;

	private Long consignorId;

	private String companyName;

	private Long companyId;

	private Long childFinanceId;

	public CostRevenueAnalysis() {
	}

	public Long getArchiveId() {
		return archiveId;
	}

	public void setArchiveId(Long archiveId) {
		this.archiveId = archiveId;
	}

	public String getVinCode() {
		return vinCode;
	}

	public void setVinCode(String vinCode) {
		this.vinCode = vinCode;
	}

	public String getVhModleName() {
		return vhModleName;
	}

	public void setVhModleName(String vhModleName) {
		this.vhModleName = vhModleName;
	}

	public String getVhCartypeId() {
		return vhCartypeId;
	}

	public void setVhCartypeId(String vhCartypeId) {
		this.vhCartypeId = vhCartypeId;
	}

	public String getVehicleName() {
		return vehicleName;
	}

	public void setVehicleName(String vehicleName) {
		this.vehicleName = vehicleName;
	}

	public Double getTyreFee() {
		return tyreFee;
	}

	public void setTyreFee(Double tyreFee) {
		this.tyreFee = tyreFee;
	}

	public Long getTransMeansId() {
		return transMeansId;
	}

	public void setTransMeansId(Long transMeansId) {
		this.transMeansId = transMeansId;
	}

	public Long getSrcWhId() {
		return srcWhId;
	}

	public void setSrcWhId(Long srcWhId) {
		this.srcWhId = srcWhId;
	}

	public String getSrcWhName() {
		return srcWhName;
	}

	public void setSrcWhName(String srcWhName) {
		this.srcWhName = srcWhName;
	}

	public void setTransType(String transType) {
		this.transType = transType;
	}

	public String getSrcProvName() {
		return srcProvName;
	}

	public void setSrcProvName(String srcProvName) {
		this.srcProvName = srcProvName;
	}

	public String getSrcLpName() {
		return srcLpName;
	}

	public void setSrcLpName(String srcLpName) {
		this.srcLpName = srcLpName;
	}

	public String getSrcCityName() {
		return srcCityName;
	}

	public void setSrcCityName(String srcCityName) {
		this.srcCityName = srcCityName;
	}

	public Long getShipmentId() {
		return shipmentId;
	}

	public void setShipmentId(Long shipmentId) {
		this.shipmentId = shipmentId;
	}

	public Date getShipmentDate() {
		return shipmentDate;
	}

	public void setShipmentDate(Date shipmentDate) {
		this.shipmentDate = shipmentDate;
	}

	public Double getRoadFee() {
		return roadFee;
	}

	public void setRoadFee(Double roadFee) {
		this.roadFee = roadFee;
	}

	public Double getRepairFee() {
		return repairFee;
	}

	public void setRepairFee(Double repairFee) {
		this.repairFee = repairFee;
	}

	public Double getOutsourcingRate() {
		return outsourcingRate;
	}

	public void setOutsourcingRate(Double outsourcingRate) {
		this.outsourcingRate = outsourcingRate;
	}

	public Double getOutsourcingFee() {
		return outsourcingFee;
	}

	public void setOutsourcingFee(Double outsourcingFee) {
		this.outsourcingFee = outsourcingFee;
	}

	public Integer getOutsourcingDistance() {
		return outsourcingDistance;
	}

	public void setOutsourcingDistance(Integer outsourcingDistance) {
		this.outsourcingDistance = outsourcingDistance;
	}

	public String getOutsourcingCompanyName() {
		return outsourcingCompanyName;
	}

	public void setOutsourcingCompanyName(String outsourcingCompanyName) {
		this.outsourcingCompanyName = outsourcingCompanyName;
	}

	public Long getOutsourcingCompanyId() {
		return outsourcingCompanyId;
	}

	public void setOutsourcingCompanyId(Long outsourcingCompanyId) {
		this.outsourcingCompanyId = outsourcingCompanyId;
	}

	public Double getOtherFeeSum() {
		return otherFeeSum;
	}

	public void setOtherFeeSum(Double otherFeeSum) {
		this.otherFeeSum = otherFeeSum;
	}

	public Double getOtherFee_9() {
		return otherFee_9;
	}

	public void setOtherFee_9(Double otherFee_9) {
		this.otherFee_9 = otherFee_9;
	}

	public Double getOtherFee_8() {
		return otherFee_8;
	}

	public void setOtherFee_8(Double otherFee_8) {
		this.otherFee_8 = otherFee_8;
	}

	public Double getOtherFee_7() {
		return otherFee_7;
	}

	public void setOtherFee_7(Double otherFee_7) {
		this.otherFee_7 = otherFee_7;
	}

	public Double getOtherFee_6() {
		return otherFee_6;
	}

	public void setOtherFee_6(Double otherFee_6) {
		this.otherFee_6 = otherFee_6;
	}

	public Double getOtherFee_5() {
		return otherFee_5;
	}

	public void setOtherFee_5(Double otherFee_5) {
		this.otherFee_5 = otherFee_5;
	}

	public Double getOtherFee_4() {
		return otherFee_4;
	}

	public void setOtherFee_4(Double otherFee_4) {
		this.otherFee_4 = otherFee_4;
	}

	public Double getOtherFee_3() {
		return otherFee_3;
	}

	public void setOtherFee_3(Double otherFee_3) {
		this.otherFee_3 = otherFee_3;
	}

	public Double getOtherFee_23() {
		return otherFee_23;
	}

	public void setOtherFee_23(Double otherFee_23) {
		this.otherFee_23 = otherFee_23;
	}

	public Double getOtherFee_22() {
		return otherFee_22;
	}

	public void setOtherFee_22(Double otherFee_22) {
		this.otherFee_22 = otherFee_22;
	}

	public Double getOtherFee_21() {
		return otherFee_21;
	}

	public void setOtherFee_21(Double otherFee_21) {
		this.otherFee_21 = otherFee_21;
	}

	public Double getOtherFee_20() {
		return otherFee_20;
	}

	public void setOtherFee_20(Double otherFee_20) {
		this.otherFee_20 = otherFee_20;
	}

	public Double getOtherFee_2() {
		return otherFee_2;
	}

	public void setOtherFee_2(Double otherFee_2) {
		this.otherFee_2 = otherFee_2;
	}

	public Double getOtherFee_19() {
		return otherFee_19;
	}

	public void setOtherFee_19(Double otherFee_19) {
		this.otherFee_19 = otherFee_19;
	}

	public Double getOtherFee_18() {
		return otherFee_18;
	}

	public void setOtherFee_18(Double otherFee_18) {
		this.otherFee_18 = otherFee_18;
	}

	public Double getOtherFee_17() {
		return otherFee_17;
	}

	public void setOtherFee_17(Double otherFee_17) {
		this.otherFee_17 = otherFee_17;
	}

	public Double getOtherFee_16() {
		return otherFee_16;
	}

	public void setOtherFee_16(Double otherFee_16) {
		this.otherFee_16 = otherFee_16;
	}

	public Double getOtherFee_15() {
		return otherFee_15;
	}

	public void setOtherFee_15(Double otherFee_15) {
		this.otherFee_15 = otherFee_15;
	}

	public Double getOtherFee_14() {
		return otherFee_14;
	}

	public void setOtherFee_14(Double otherFee_14) {
		this.otherFee_14 = otherFee_14;
	}

	public Double getOtherFee_13() {
		return otherFee_13;
	}

	public void setOtherFee_13(Double otherFee_13) {
		this.otherFee_13 = otherFee_13;
	}

	public Double getOtherFee_12() {
		return otherFee_12;
	}

	public void setOtherFee_12(Double otherFee_12) {
		this.otherFee_12 = otherFee_12;
	}

	public Double getOtherFee_11() {
		return otherFee_11;
	}

	public void setOtherFee_11(Double otherFee_11) {
		this.otherFee_11 = otherFee_11;
	}

	public Double getOtherFee_10() {
		return otherFee_10;
	}

	public void setOtherFee_10(Double otherFee_10) {
		this.otherFee_10 = otherFee_10;
	}

	public Double getOtherFee_1() {
		return otherFee_1;
	}

	public void setOtherFee_1(Double otherFee_1) {
		this.otherFee_1 = otherFee_1;
	}

	public Long getOrderId() {
		return orderId;
	}

	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}

	public Double getOilUsage() {
		return oilUsage;
	}

	public void setOilUsage(Double oilUsage) {
		this.oilUsage = oilUsage;
	}

	public Double getOilFee() {
		return oilFee;
	}

	public void setOilFee(Double oilFee) {
		this.oilFee = oilFee;
	}

	public String getManufactorName() {
		return manufactorName;
	}

	public void setManufactorName(String manufactorName) {
		this.manufactorName = manufactorName;
	}

	public Double getMainDriverSalary() {
		return mainDriverSalary;
	}

	public void setMainDriverSalary(Double mainDriverSalary) {
		this.mainDriverSalary = mainDriverSalary;
	}

	public Integer getLoadQuantity() {
		return loadQuantity;
	}

	public void setLoadQuantity(Integer loadQuantity) {
		this.loadQuantity = loadQuantity;
	}

	public String getLoadNumber() {
		return loadNumber;
	}

	public void setLoadNumber(String loadNumber) {
		this.loadNumber = loadNumber;
	}

	public String getLoadGroupNumber() {
		return loadGroupNumber;
	}

	public void setLoadGroupNumber(String loadGroupNumber) {
		this.loadGroupNumber = loadGroupNumber;
	}

	public Double getLoadDistance() {
		return loadDistance;
	}

	public void setLoadDistance(Double loadDistance) {
		this.loadDistance = loadDistance;
	}

	public Date getLeavingDate() {
		return leavingDate;
	}

	public void setLeavingDate(Date leavingDate) {
		this.leavingDate = leavingDate;
	}

	public String getIsOutsourcing() {
		return isOutsourcing;
	}

	public void setIsOutsourcing(String isOutsourcing) {
		this.isOutsourcing = isOutsourcing;
	}

	public Double getFirstViceDriverSalary() {
		return firstViceDriverSalary;
	}

	public void setFirstViceDriverSalary(Double firstViceDriverSalary) {
		this.firstViceDriverSalary = firstViceDriverSalary;
	}

	public Long getFirstShipmentId() {
		return firstShipmentId;
	}

	public void setFirstShipmentId(Long firstShipmentId) {
		this.firstShipmentId = firstShipmentId;
	}

	public Long getFinanceId() {
		return financeId;
	}

	public void setFinanceId(Long financeId) {
		this.financeId = financeId;
	}

	public Integer getEmptyCostSum() {
		return emptyCostSum;
	}

	public void setEmptyCostSum(Integer emptyCostSum) {
		this.emptyCostSum = emptyCostSum;
	}

	public String getEmptyCodeUnion() {
		return emptyCodeUnion;
	}

	public void setEmptyCodeUnion(String emptyCodeUnion) {
		this.emptyCodeUnion = emptyCodeUnion;
	}

	public Long getDispatchOrderId() {
		return dispatchOrderId;
	}

	public void setDispatchOrderId(Long dispatchOrderId) {
		this.dispatchOrderId = dispatchOrderId;
	}

	public String getDispatchOrderCode() {
		return dispatchOrderCode;
	}

	public void setDispatchOrderCode(String dispatchOrderCode) {
		this.dispatchOrderCode = dispatchOrderCode;
	}

	public String getDestWhName() {
		return destWhName;
	}

	public void setDestWhName(String destWhName) {
		this.destWhName = destWhName;
	}

	public Long getDestWhId() {
		return destWhId;
	}

	public void setDestWhId(Long destWhId) {
		this.destWhId = destWhId;
	}

	public String getDestProvName() {
		return destProvName;
	}

	public void setDestProvName(String destProvName) {
		this.destProvName = destProvName;
	}

	public String getDestLpName() {
		return destLpName;
	}

	public void setDestLpName(String destLpName) {
		this.destLpName = destLpName;
	}

	public String getDestCityName() {
		return destCityName;
	}

	public void setDestCityName(String destCityName) {
		this.destCityName = destCityName;
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public Long getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Long customerId) {
		this.customerId = customerId;
	}

	public String getContractSrcWhName() {
		return contractSrcWhName;
	}

	public void setContractSrcWhName(String contractSrcWhName) {
		this.contractSrcWhName = contractSrcWhName;
	}

	public Long getContractSrcWhId() {
		return contractSrcWhId;
	}

	public void setContractSrcWhId(Long contractSrcWhId) {
		this.contractSrcWhId = contractSrcWhId;
	}

	public String getContractSrcProvName() {
		return contractSrcProvName;
	}

	public void setContractSrcProvName(String contractSrcProvName) {
		this.contractSrcProvName = contractSrcProvName;
	}

	public String getContractSrcLpName() {
		return contractSrcLpName;
	}

	public void setContractSrcLpName(String contractSrcLpName) {
		this.contractSrcLpName = contractSrcLpName;
	}

	public String getContractSrcCityName() {
		return contractSrcCityName;
	}

	public void setContractSrcCityName(String contractSrcCityName) {
		this.contractSrcCityName = contractSrcCityName;
	}

	public Integer getContractKilometer() {
		return contractKilometer;
	}

	public void setContractKilometer(Integer contractKilometer) {
		this.contractKilometer = contractKilometer;
	}

	public Float getContractFeeRate() {
		return contractFeeRate;
	}

	public void setContractFeeRate(Float contractFeeRate) {
		this.contractFeeRate = contractFeeRate;
	}

	public Float getContractFee() {
		return contractFee;
	}

	public void setContractFee(Float contractFee) {
		this.contractFee = contractFee;
	}

	public String getContractDestWhName() {
		return contractDestWhName;
	}

	public void setContractDestWhName(String contractDestWhName) {
		this.contractDestWhName = contractDestWhName;
	}

	public Long getContractDestWhId() {
		return contractDestWhId;
	}

	public void setContractDestWhId(Long contractDestWhId) {
		this.contractDestWhId = contractDestWhId;
	}

	public String getContractDestProvName() {
		return contractDestProvName;
	}

	public void setContractDestProvName(String contractDestProvName) {
		this.contractDestProvName = contractDestProvName;
	}

	public String getContractDestLpName() {
		return contractDestLpName;
	}

	public void setContractDestLpName(String contractDestLpName) {
		this.contractDestLpName = contractDestLpName;
	}

	public String getContractDestCityName() {
		return contractDestCityName;
	}

	public void setContractDestCityName(String contractDestCityName) {
		this.contractDestCityName = contractDestCityName;
	}

	public String getConsignorName() {
		return consignorName;
	}

	public void setConsignorName(String consignorName) {
		this.consignorName = consignorName;
	}

	public Long getConsignorId() {
		return consignorId;
	}

	public void setConsignorId(Long consignorId) {
		this.consignorId = consignorId;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public Long getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Long companyId) {
		this.companyId = companyId;
	}

	public Long getChildFinanceId() {
		return childFinanceId;
	}

	public void setChildFinanceId(Long childFinanceId) {
		this.childFinanceId = childFinanceId;
	}
	  /**
     * @return the transType
     */
    @Transient
    public TransType getTransType() {
    	
    	if (StringUtils.isBlank(transType)) {
    		return null;
    	}
    	
        return TransType.ordinalOf(transType);
        
    }
}
